<?php

class IndexController extends Zend_Controller_Action {
	
	public function init() {
		/* Initialize action controller here */
	}
	
	public function indexAction() {
		$this->view->test = "sdf";
	}
	public function fckAction() {
		//Let's append the decorator to our previously created form class
		 $form = new Application_Form_MyForm ();
		 $form->addPrefixPath('CU_Form_Decorator', 'CU/Form/Decorator', Zend_Form_Element::DECORATOR );
		
		//The textarea's name was content so we can access it like this
		 $form->content->addDecorator ( new CU_Form_Decorator_FckEditor () );
		 $this->view->form = $form;
	}
	
	public function ckAction() {
		$this->view->headTitle ( 'встраиваем Wysiwyg' );
		$form = new Application_Form_Wysiwyg ();
		if ($form->isValid ( $_POST )) {
			$this->view->message = $form->getValues ();
		} else {
			$this->view->form = $form;
		}
	}

}

